--TEST--
Check for jsonschema  number validate
--SKIPIF--

<?php if (!extension_loaded("jsonschema"))
    print "skip"; ?>
--FILE--
<?php
$userType = '
            {
                "id": "user",
                "description": "user info",
                "type": "object",
                "optional": true,
                "properties": {
                    "account": {"type": "boolean"},
                    "email": {"type": "string", "optional": true}
                }
            }';

/* array List<Map> */
$type = array();
$type['users'][] = array('account' => 'userA', 'email' => 'userA@example.com');
$type['users'][] = array('account' => 'userB', 'email' => 'userB@example.com');
$type['users'][] = array('account' => 'userC', 'email' => 'userC@example.com');
$jsonSchema = new JsonSchema(json_encode($type));
$jsonSchema->addType($userType);
echo assert(!$jsonSchema->validate('
            {
               "type":"object",
               "properties":{
                  "users":{
                     "type":"array",
                     "items":{
                        "$ref":"user"
                     }
                  }
               }
            }')), PHP_EOL;
echo count($jsonSchema->getErrors()), PHP_EOL;
?>
--EXPECT--
1
1


